package com.example.administrator.base.bean;

import com.google.gson.Gson;

/**
 * Created by Wang on 2017/8/16.
 */

public class GprsReqBean {


    /**
     * code : 1
     * lockGpsRealData : {"map":{"altitude":4,"addTime":"2017-06-07 15:06:48","openLockTimes":0,"signalIntensity":20,"batteryVoltage":4.21,"latitude":31.23222975067778,"updateTime":"2017-08-16 09:50:13","lastChargeTime":"2017-08-16 09:24:42","isCharging":1,"speed":0,"sendTime":"2017-08-16 09:24:58","satelliteNum":7,"alarmState":0,"lockStatus":"锁关_定时上传_运营_放电_正常","chargeVoltage":0,"online":true,"iD":5,"simNo":"063075816153","longitude":121.35121639724983,"direction":310,"status":262146,"batteryLevel":100}}
     * message : 获取车辆信息成功
     */

    private int code;
    private LockGpsRealDataEntity lockGpsRealData;
    private String message;

    public static GprsReqBean objectFromData(String str) {

        return new Gson().fromJson(str, GprsReqBean.class);
    }

    public void setCode(int code) {
        this.code = code;
    }

    public void setLockGpsRealData(LockGpsRealDataEntity lockGpsRealData) {
        this.lockGpsRealData = lockGpsRealData;
    }

    public void setMessage(String message) {
        this.message = message;
    }

    public int getCode() {
        return code;
    }

    public LockGpsRealDataEntity getLockGpsRealData() {
        return lockGpsRealData;
    }

    public String getMessage() {
        return message;
    }

    public static class LockGpsRealDataEntity {
        /**
         * map : {"altitude":4,"addTime":"2017-06-07 15:06:48","openLockTimes":0,"signalIntensity":20,"batteryVoltage":4.21,"latitude":31.23222975067778,"updateTime":"2017-08-16 09:50:13","lastChargeTime":"2017-08-16 09:24:42","isCharging":1,"speed":0,"sendTime":"2017-08-16 09:24:58","satelliteNum":7,"alarmState":0,"lockStatus":"锁关_定时上传_运营_放电_正常","chargeVoltage":0,"online":true,"iD":5,"simNo":"063075816153","longitude":121.35121639724983,"direction":310,"status":262146,"batteryLevel":100}
         */

        private MapEntity map;

        public static LockGpsRealDataEntity objectFromData(String str) {

            return new Gson().fromJson(str, LockGpsRealDataEntity.class);
        }

        public void setMap(MapEntity map) {
            this.map = map;
        }

        public MapEntity getMap() {
            return map;
        }

        public static class MapEntity {
            /**
             * altitude : 4
             * addTime : 2017-06-07 15:06:48
             * openLockTimes : 0
             * signalIntensity : 20
             * batteryVoltage : 4.21
             * latitude : 31.23222975067778
             * updateTime : 2017-08-16 09:50:13
             * lastChargeTime : 2017-08-16 09:24:42
             * isCharging : 1
             * speed : 0
             * sendTime : 2017-08-16 09:24:58
             * satelliteNum : 7
             * alarmState : 0
             * lockStatus : 锁关_定时上传_运营_放电_正常
             * chargeVoltage : 0
             * online : true
             * iD : 5
             * simNo : 063075816153
             * longitude : 121.35121639724983
             * direction : 310
             * status : 262146
             * batteryLevel : 100
             */

            private int altitude;
            private String addTime;
            private int openLockTimes;
            private int signalIntensity;
            private double batteryVoltage;
            private double latitude;
            private String updateTime;
            private String lastChargeTime;
            private int isCharging;
            private int speed;
            private String sendTime;
            private int satelliteNum;
            private int alarmState;
            private String lockStatus;
            private double chargeVoltage;
            private boolean online;
            private int iD;
            private String simNo;
            private double longitude;
            private int direction;
            private int status;
            private int batteryLevel;

            public static MapEntity objectFromData(String str) {

                return new Gson().fromJson(str, MapEntity.class);
            }

            public void setAltitude(int altitude) {
                this.altitude = altitude;
            }

            public void setAddTime(String addTime) {
                this.addTime = addTime;
            }

            public void setOpenLockTimes(int openLockTimes) {
                this.openLockTimes = openLockTimes;
            }

            public void setSignalIntensity(int signalIntensity) {
                this.signalIntensity = signalIntensity;
            }

            public void setBatteryVoltage(double batteryVoltage) {
                this.batteryVoltage = batteryVoltage;
            }

            public void setLatitude(double latitude) {
                this.latitude = latitude;
            }

            public void setUpdateTime(String updateTime) {
                this.updateTime = updateTime;
            }

            public void setLastChargeTime(String lastChargeTime) {
                this.lastChargeTime = lastChargeTime;
            }

            public void setIsCharging(int isCharging) {
                this.isCharging = isCharging;
            }

            public void setSpeed(int speed) {
                this.speed = speed;
            }

            public void setSendTime(String sendTime) {
                this.sendTime = sendTime;
            }

            public void setSatelliteNum(int satelliteNum) {
                this.satelliteNum = satelliteNum;
            }

            public void setAlarmState(int alarmState) {
                this.alarmState = alarmState;
            }

            public void setLockStatus(String lockStatus) {
                this.lockStatus = lockStatus;
            }

            public void setChargeVoltage(double chargeVoltage) {
                this.chargeVoltage = chargeVoltage;
            }

            public void setOnline(boolean online) {
                this.online = online;
            }

            public void setID(int iD) {
                this.iD = iD;
            }

            public void setSimNo(String simNo) {
                this.simNo = simNo;
            }

            public void setLongitude(double longitude) {
                this.longitude = longitude;
            }

            public void setDirection(int direction) {
                this.direction = direction;
            }

            public void setStatus(int status) {
                this.status = status;
            }

            public void setBatteryLevel(int batteryLevel) {
                this.batteryLevel = batteryLevel;
            }

            public int getAltitude() {
                return altitude;
            }

            public String getAddTime() {
                return addTime;
            }

            public int getOpenLockTimes() {
                return openLockTimes;
            }

            public int getSignalIntensity() {
                return signalIntensity;
            }

            public double getBatteryVoltage() {
                return batteryVoltage;
            }

            public double getLatitude() {
                return latitude;
            }

            public String getUpdateTime() {
                return updateTime;
            }

            public String getLastChargeTime() {
                return lastChargeTime;
            }

            public int getIsCharging() {
                return isCharging;
            }

            public int getSpeed() {
                return speed;
            }

            public String getSendTime() {
                return sendTime;
            }

            public int getSatelliteNum() {
                return satelliteNum;
            }

            public int getAlarmState() {
                return alarmState;
            }

            public String getLockStatus() {
                return lockStatus;
            }

            public double getChargeVoltage() {
                return chargeVoltage;
            }

            public boolean getOnline() {
                return online;
            }

            public int getID() {
                return iD;
            }

            public String getSimNo() {
                return simNo;
            }

            public double getLongitude() {
                return longitude;
            }

            public int getDirection() {
                return direction;
            }

            public int getStatus() {
                return status;
            }

            public int getBatteryLevel() {
                return batteryLevel;
            }
        }
    }
}
